<div class="layui-container fly-marginTop fly-user-main">
<?php include_once __DIR__.'/../inc/user_left.html';?>
    <div class="fly-panel fly-panel-user" pad20>
    <!--
    <div class="fly-msg" style="margin-top: 15px;">
      您的邮箱尚未验证，这比较影响您的帐号安全，<a href="activate.html">立即去激活？</a>
    </div>
    -->
    <div class="layui-tab layui-tab-brief" lay-filter="user">
      <ul class="layui-tab-title" id="LAY_mine">
        <li data-type="mine-jie" lay-id="index" class="layui-this">我发的帖（<span><?=$page_count?></span>）</li>
        <!-- <li data-type="collection" data-url="/collection/find/" lay-id="collection">我收藏的帖（<span>16</span>）</li> -->
      </ul>
      <div class="layui-tab-content" style="padding: 20px 0;">
        <div class="layui-tab-item layui-show">
          <ul class="mine-view jie-row">
            <?php foreach($list as $v):?>
            <li>
              <a class="jie-title" href="<?=url('tie/detail',['id'=>$v['id']])?>" target="_blank"><?=$v['title']?></a>
              <i><?=com_time_format($v['create_time'],'f')?></i>
              <a class="mine-edit" href="<?=url('tie/edit',['id'=>$v['id']])?>">编辑</a>
              <em><?=$v['views']?>阅/<?=$v['reply_count']?>答</em>
            </li>
            <?php endforeach;?>
          </ul>
          <div id="page"></div>
        </div>
      </div>
    </div>
  </div>
</div>

<script type="text/javascript">
//分页
layui.use(['laypage'], function(){
    var laypage = layui.laypage;
    laypage.render({
      elem: 'page'
      ,count:<?=$page_count?>
      ,curr:<?=$page?>
      ,limit:10
      ,jump: function(obj,first){
        //首次不执行
        if(!first){
            var o = GetRequest();
                o.page = obj.curr;
                o.url  = '/user/tie';
            window.location.href = createUrl(o);
        }
      }
    });
});
</script>
